package tree;

/**
 * @author way
 * @create 2025-02-11 13:33
 */
public class _222_countNodes {
    public int countNodes(TreeNode root) {
        if (root == null) return 0;

        return countNodes(root.left)+countNodes(root.right)+1;
    }
}
